package com.b2c.annotation;

import ch.qos.logback.core.util.TimeUtil;

import javax.validation.constraints.NotNull;
import java.lang.annotation.*;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.concurrent.TimeUnit;

/**
 * api限流注解
 * 对请求者的ip进行限流
 * @author Administrator
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ApiLimit {
    //限流的次数
    int limitCount();

    //限流的时间
    long time();

    //时间单位
    ChronoUnit timeunit() default ChronoUnit.SECONDS;


}
